<%@page import="guest.Guest"%>
<%@page import="java.util.Vector"%>
<%@page import="guest.GuestVo"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>member.jsp</title>
<style>
@import url(http://fonts.googleapis.com/earlyaccess/jejugothic.css);
	/* "Jeju Gothic" */
body {
	font-family: "Jeju Gothic";
	font-size: 18px;
}

#cGroup {
	border: 2px solid #aabbcc;
	background-color: #FFFFD2;
	padding: 10px;
}

#dNo {
	float: left;
	width: 100px;
	text-align: left;
}

#btnGroup1 {
	text-align: center;
}

#btnGroup2 {
	float: right;
	width: 200px;
	text-align: right;
}
</style>
<script>
function modify(s){
	location.href = "index2.jsp?inc_content=./guest/modify.jsp&serial=" + s;
}
function del(s){
	
	var y= confirm("정말 삭제하시겠습니까?");
	if(y){
		location.href = "index2.jsp?inc_content=./guest/delete_result.jsp&serial=" + s;
	}else{
		alert("삭제가 취소되었습니다.");
	}

}

function init(){
	document.getElementById('btnFind').onclick = funcFind;
	
	document.getElementById('find').onkeyup = function(ev){
		if(ev.keyCode == 13)
			funcFind();
	}
	
	document.getElementById('btnWrite').onclick = function(){
		location.href = "index2.jsp?inc_content=./guest/insert.jsp";
	}
	
}
function funcFind(){
	var find = document.getElementById('find').value;
	guest_form.action = 'index2.jsp?inc_content=./guest/list.jsp&find=' + find;
	guest_form.submit();
}

</script>

</head>
<body>
	<jsp:useBean id="vo" class="guest.GuestVo" />
	<jsp:setProperty property="*" name="vo" />

	<%
		Guest g= new Guest();
		g.setVo(vo);
		Vector<GuestVo> v=g.list();
	%>

	<h1>✦회원관리</h1>

	<%
		for(int i=0; i<v.size();i++){
			GuestVo gv = v.get(i);
	%>
	<hr width=100% align="left" noshade="noshade" height=1px;>
		<div id='dWriter'>No.<%=gv.getSerial()%> <%=gv.getMid()%>[<%=gv.getMdate()%>]</div>
	<%}%>
	
	<hr width=100% align="left" noshade="noshade" size='3px';>
	<script>
		init();
	</script>

</body>
</html>